import 'package:flutter/material.dart';
import 'package:get/get.dart';

import '../../common/base/base_controller.dart';
import 'main_state.dart';

class MainLogic extends BaseController with GetTickerProviderStateMixin {
  final MainState state = MainState();

  late final TabController tabController =
      TabController(initialIndex: 0, length: state.tabLocalKeyList.length, vsync: this);

  @override
  void onInit() {
    super.onInit();
    tabController.addListener(() {
      state.currentTabIndex.value = tabController.index;
    });
  }
}
